package app.datavalue;


public enum MessageStatus 
{
	//ASSIGNED,
	IN_PROCESSING(0),
	PROCESSED(1),
	UNASSIGNED(2);
	

	
	private final int code;
	
	MessageStatus( int code )
	{
		this.code = code;
	}
	
	public int toInt() { return code; }

    public static MessageStatus fromInt(int code) 
    {
        switch (code) {
        case 0: return IN_PROCESSING;
        case 1: return PROCESSED;
        case 2: return UNASSIGNED;
        default: throw new RuntimeException("Unknown MessageStatus code");
    }

    }
	
	
}
